/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ik.Reposteria.SMP.Encapsulados;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Malkavian
 */
@Embeddable
public class RelacioningredientesPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "Ingredientes_id")
    private int ingredientesid;
    @Basic(optional = false)
    @Column(name = "Ingredientes_id1")
    private int ingredientesid1;

    public RelacioningredientesPK() {
    }

    public RelacioningredientesPK(int ingredientesid, int ingredientesid1) {
        this.ingredientesid = ingredientesid;
        this.ingredientesid1 = ingredientesid1;
    }

    public int getIngredientesid() {
        return ingredientesid;
    }

    public void setIngredientesid(int ingredientesid) {
        this.ingredientesid = ingredientesid;
    }

    public int getIngredientesid1() {
        return ingredientesid1;
    }

    public void setIngredientesid1(int ingredientesid1) {
        this.ingredientesid1 = ingredientesid1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) ingredientesid;
        hash += (int) ingredientesid1;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RelacioningredientesPK)) {
            return false;
        }
        RelacioningredientesPK other = (RelacioningredientesPK) object;
        if (this.ingredientesid != other.ingredientesid) {
            return false;
        }
        if (this.ingredientesid1 != other.ingredientesid1) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.ik.Reposteria.SMP.Encapsulados.RelacioningredientesPK[ ingredientesid=" + ingredientesid + ", ingredientesid1=" + ingredientesid1 + " ]";
    }
    
}
